package com.java.ext;

import java.awt.Color;

import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.JButton;

public class MyButton extends JButton{
	
	private static final long serialVersionUID = 4231845877692729111L;

	public MyButton() {
		super();
	}

	public MyButton(Action a) {
		super(a);
	}

	public MyButton(Icon icon) {
		super(icon);
	}

	public MyButton(String text, Icon icon) {
		super(text, icon);
	}

	public MyButton(String text) {
		super(text);
	}

	public MyButton defaultt() {
		setBackground(new Color(244, 244, 244));
		setForeground(Color.BLACK); 
		return this;
	}

	public MyButton primary() {
		setBackground(new Color(60, 141, 188));
		setForeground(Color.WHITE); 
		return this;
	}

	public MyButton success() {
		setBackground(new Color(0, 166, 90));
		setForeground(Color.WHITE); 
		return this;
	}

	public MyButton info() {
		setBackground(new Color(0, 192, 239));
		setForeground(Color.WHITE); 
		return this;
	}

	public MyButton warning() {
		setBackground(new Color(243, 156, 18));
		setForeground(Color.WHITE); 
		return this;
	}

	public MyButton danger() {
		setBackground(new Color(221, 75, 57));
		setForeground(Color.WHITE); 
		return this;
	}
	
}
